3.1 How to Setup your server

After installing the BPFTP Server, you may want to launch the server. You'll see the loading bar and then the main interface. At this state your server is quite useless, because you must setup user accounts, file access, etc. first!

Setup user accounts

Click on the toolbar button to bring up this form:


  1. create a new user: right-click on the left list and select 'Add' in the popup menu
  2. enter the new user account (note: this is not always the user login) and click 'OK'
  3. if you want your user to use a login ('Demo' in the example) then check the box 'login'. If you do not check the 'login' box the user can log in with any login. This can be useful to setup an 'anonymous' user.
  4. setup a password: check the password box or let the user log in with any password, even a blank one (again a sort of free account).
As the number of combinations may become a little difficult to understand, here's a short overview:

Case 1:
+Login checked and specified
+Password checked and specified
->user logs in both with Login and Pass

Case 2:
-Login not checked
-Password not checked
->Any user can have access to this FTP account, providing any username and even a blank password

Case 3:
+Login checked
-Password not checked
->user must specify the correct login but can provide any (even a blank) password

Case 4:
-Login checked
+Password checked
->Any login can be specified, only the password is verified -> if a user with this password exists then the user will be logged as this user
->In fact this acts as if the password was the login for those 'loginless' user

In case there is a free account and users try to log in with bad passwords or bad usernames, they will automatically be logged in on the free/anonymous account (one with no login & password enabled).

So I'm quite sure you will find the right combination that serves your purposes.

In our example, the user must supply: Login=Demo and Password=Demo.
If you want to setup an anonymous user simply create an account named 'anonymous' with no login and no password (both unchecked).

Note: if previously specified under Main Setup | Options, login and password are case sensitive: 'DeMo' and 'demo' are not the same login.

 

Directory Access

Now that a user can log in, you must provide access to your shared files.

Files:
R: Read Access enabled: a user can download from the specified directory
W: Write Access enabled: a user can upload in the specified directory
D: Delete Access enabled: a user can delete files in the specified directory
A: Append Access enabled: a user can resume an upload in the specified directory

Directory:
M: Make Directory enabled: a user can create directories in the specified directory
L: List Directory enabled: a user can list files in the specified directory
K: Delete Directory enabled: a user can delete directories in the specified directory
S: Subdir enabled: a user can go down subdirectories of the specified directory

You can as well uncheck all access rights, this will give a user no access to the directory, it won't even be listed.

Note:
  1. if you try to share the server directory (i.e. allow users to have access to your ini-files) then the server will ask you to confirm the specified directory since this is a large security breach!
  2. if you specify an incorrect (non existent) directory then the directory will be striked through
  3. the user's home directory is always the first directory in the list; the font is colored red
  4. you can rename a directory by right-clicking on it and selecting 'edit'
  5. the directory hierarchy is not important as BPFTP Server will always know the nearest parent directory in the list:

    for example, if a user has access to:

    c:\temp\upload - RWDMLSK
    c:\temp\upload\read - R---L--

    and c:\temp\upload has the following structure:

    c:\temp\upload\my favourite picture\
    c:\temp\upload\amiga 500\
    c:\temp\upload\read\

    then the user will have RWDMLSK access to all directories except c:\temp\upload\read; in this directory he will only have RL access. You see, there's no need to specify any order for the directories. Try to play around a little with the directory settings and you will make for a marvellous FTP Server!

 

Misc properties

Need more advanced properties for your account? For a better configuration we provide you with some extra options:

Message Files


There are 3 types of message files:

Note: the ChangeDir file can also be a file without a specific path, in that case the server will check any directory for this file and process it in case it exists. Using this method you can add specific files with different messages to every directory.
Alternatively you could place a message file (maybe called 'chgdir_msg.txt') e.g. in your upload directory exclusively so people would only see a message when they would enter it to upload files. In any case you should set this file's attribute to 'hidden' and also check 'Hide files/dirs with 'hidden' attribute set' under 'Setup User/Group accounts | Miscellaneous'.

The first two message files support many tags:

%MAXUSERS = the maximum number of users which can be connected to the server at the same time
%LOCALIP = the IP address of the server
%UIP, %CLIENTIP = the IP address of the client
%CLIENTIP_000 = returns formated ip like 192.168.000.010 (for use with filename and sorting).

%UHOSTNAME = the hostname of the client
%UNAME = the user's account name
%USPEEDLIMIT = the maximum speed the user will be able to send/receive at
%CNOW = the number of users currently connected
%CALL = the total number of user connections to the server since startup
%C24H = the number of connections during the last 24h
%UTIMEOUT = current user TimeOut

%LOGFILE = (current log file), %LOGFILEOLD (previous log file) to go with OnLogFileRotate events.

%URATIOCREDIT = current user ratio credit (if ratio is enabled)
(%URATIOCREDITxx with xx=KB, MB,GB)

%UQUOTACURRENTxx (with xx=KB, MB, GB) = current quota
%UQUOTAMAXxx (with xx=KB, MB, GB) = max quota

%UHOME = current user home dir (if showrelativepath is disabled)
%UCURRENTDIR = current user dir
%URATIO = current upload/download ratio
%URATIOUP = current upload ratio 
%URATIODOWN = current download ratio 

%WELCOMEIP = create a file named "welcome_<ip>.txt" (welcome_192.168.0.128.txt) and server will send it as welcome message for ip (to be used with virtual server).
%WELCOMEUNAME = merges "welcome_uname.txt" (uname = username) from server directory in the message / event.

%SERVERSECS  = \
%SERVERMINS  =   time the server is online
%SERVERHOURS = /
%SERVERDAYS  =/

%SERVERTIMEUP = server uptime since online
%SERVERTOTUPTIME = server total uptime since installation

%TOPDAY, %TOPWEEK, %TOPMONTH, %TOPALL = merge .top file in the message

 -= All Session =-

(xx = KB,MB,GB)

%SERVERxxUP  = uploaded to the server (all sessions)
%SERVERxxDOWN = downloaded from the server (all sessions)
%SERVERxxALL = transferred to the server = %SERVERxxUP + %SERVERxxDOWN

%SERVERSPEEDxx = Current server speed

 -= Server Session =-

%SESSIONxxUP = KB uploaded to the server by clients
%SESSIONxxDOWN = KB downloaded from the server by clients
%SESSIONxxALL = KB transferred to the server = %SESSIONKBUP + %SESSIONKBDOWN

%SESSIONxxTOTAL = KB transferred by the server including uploads, downloads,
                  directory listings, answers to commands ...

%SESSIONFILESUP = number of files uploaded to the server 
%SESSIONFILESDOWN = number of files downloaded from the server 
%SESSIONFILESALL = %SESSIONFILESUP + %SESSIONFILESDOWN

%SESSIONAVG = average bytes transferred by the server

 -= Time/Date =-

%TIME_EX = reports formated time as "hhmmss"

%TIME, %SERVERTIME = server's machine time

%DATE_EX_DMY, _YMD, _MDY = returns formatted date : 2000-11-30 for example (D=day, M=month, Y=year)

%SERVERDATE = server's machine date
%SERVERLOCALHOST = server's local hostname
%SERVERVERSION = server version

%DISK = if 'Show Relative Paths' is not enabled return disk drive
%DFREE, %DFREEKB, %DFREEMB, %DFREEGB = free space in current directory (byte, Kbyte, Mbyte, Gbyte)

%DFREEx (x=drive letter) = report free drive space on x (also avail. : %DFREExKB, %DFREExMB, %DFREExGB).

 -= user =-

%FUP = number of files uploaded by current user (current session)
%FDOWN = number of files downloaded by current user (current session)
%FTOT = %FUP + %FDOWN (current session)

%BUP, %KBUP, %MBUP, %GBUP = number of bytes uploaded by current user (current session)
%BDOWN, %KBDOWN, %MBDOWN, %GBDOWN = number of bytes downloaded by current user (current session)
%BTOT = %BUP + %BDOWN (current session)
(%KBTOT, %MBTOT, %GBTOT)

%BDOWNALL, %KBDOWNALL, %MBDOWNALL, %GBDOWNALL = downloaded by current user (all session)
%BUPALL, %KBUPALL, %MBUPALL, %GBUPALL = uploaded by current user (all session)

%TMIN = minutes since current user is connected
%TSEC = seconds since current user is connected (not equal to %TMIN * 60)

%UFILESPEED, %UFILESPEEDKB, %UFILESPEEDMB = report speed for last transfer.

 -= Server =-

%SITEWHO = who's online.

%PCPROC = type and number of server ⁿrocessor (Intel, AMD, Cyrix ... K6, Pentium II, ...)
%PCRAM = amount of physical memory

%OSVER = Windows version (95, 98, NT, Service Pack if available ...)

%S_IP = server IP separated by commas

A typical login file could be:
==========================================
Hello, user from %UIP !
You are user #%CNOW of %MAXUSERS maximum users
It is %SERVERTIME, we are the %SERVERDATE.
==========================================
You are connected to %SERVERVERSION, this server has %PCPROC and %PCRAM KB of Ram.
This server has already served %SESSIONKBUP KB to client and received %SESSIONKBDOWN KB
at an average rate of %SESSIONAVG KB/s.
You will be disconnected after %UTIMEOUT s of inactivity.

Have a nice day on our server!
That's all for those files.

 

Links Settings

This feature allows you to redirect clients to any directory placed on other drives.

You can specify how links are handled:

You can add links from a file (see links file) or define links using a Windows ShortCut (.lnk file): simply create a shortcut to the target directory and give a user access to this directory. The last option is to auto-include links to the user's home directory called 'Home' which will always redirect to the user's home directory.

Notes:

For more information see 'Links file & Virtual Directories'.

 

Ratio/Quota Settings

Well, you have certainly seen such features in other servers ;) What is it ?



1 - Ratio
When you don't want lamers to download your files without uploading some of their own then you can set a ratio.

For example, if you want a user to get 1 byte of download for every byte they upload, the ratio is set to 1/1; 1 byte upload for 2 bytes to download makes a ratio of 1/2. If they upload a file of 100 bytes at a ratio set to 1/2, they will have 200 bytes for credit but only 50 bytes if the ratio is set to 2/1.

For uploads: NewCredit = CurrentCredit + RatioDownload / RatioUpload * FileSize
For downloads: NewCredit = CurrentCredit - FileSize

Count bytes per session / Count files per session
Some ratios may have to be temporary such as those of anonymous users sharing the same account: when users log in they are given a default credit specified in the credit box. This credit is only valid for the time of their connect and is not shared by all users connected under this account.

Count bytes all sessions / Count files all sessions
Well this ratio persists after a disconnect, so you will be given the credit you had the last time before you disconnected from the server. Having this ratio method set by the admin, two users that connect under the same account will share their credit between each other: if their credit is 1000 bytes, ratio 1/1 and A downloads 500 bytes then A's & B's credit will be 500 after A finished downloading.

Note: credits are updated during your operation so that a stopped download will only decrement your credit by the amount of bytes/files you have downloaded successfully; when you continue the download later on, your credit will be corresponding. Another point is that credits are internally pre-calculated.

For example: A & B connected under the same account with a credit of 30 MB, A starts downloading 16 MB before B, B wants to download 15 MB (A has not finished his download) then B cannot start downloading cause 16 MB + 15 MB > 30 MB. If A stops his download then his credit will only be decremented by the amount he downloaded so far => B will be able to download if A has downloaded less than 1 MB. This procedure only applies to 'Count bytes all Sessions/Count files all sessions' (credit is decremented only at the end of the download for both 'Count files'-methods).

2 - Quota
This is another useful feature which allows you to set the maximum space each user can use on your server. Like Ratios, Quotas are calculated during upload (for REST method , etc.). A user cannot upload if he exceeds his quota => he needs to delete some files. If a user's quota is zero and he deletes a file, his quota remains at zero.

3 - Bps, Speed Limit
Simply enter the speed limit you want to apply to the account. Don't forget that 1KB = 1024 bytes!

 

IP & Banned Files


These options are used to limit possible annoyances on your server:


Note: IP Access follows the rules of the Server's global IP access settings (wildcards, rules, etc.).

 

Choose a group for your user

If you want several users to have the same access rights to your FTP Server it's a good idea to setup one group account for all of them rather than giving new accounts to each. This is a very sophisticated method to handle large numbers of users/user rights without too much of work.

Click on to define a group

In our example we have created a group called 'Demo_Group'. All members of this group have RLS access to 'C:\'. The group password is not defined so if you want your users to have a password then you can specify:

Note concerning group rules: